﻿using Configs;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class AimCOM : MonoBehaviour
{
    Image AimImage;
    InputReaderMan inputReader;


    public void Init(InputReaderMan inputReader)
    {
        this.inputReader = inputReader;
    }

    private void Start()
    {
        AimImage = GetComponent<Image>();
    }

    // Update is called once per frame
    void LateUpdate()
    {
        //AimImage.transform.position = inputReader.AimPosition;
        //if (inputReader.AimPosition == Vector3.zero)
        //{
        //    if (AimImage.enabled)
        //    {
        //        AimImage.enabled = false;
        //    }
        //}
        //else if(!AimImage.enabled)
        //{

        //    AimImage.enabled = true;
        //}

        AimImage.transform.position = inputReader.AimPosition;

    }
}
